#导包
import unittest
#继承testcase
import requests


class TestDemo(unittest.TestCase):
#构造数据
  def test_login(self):
    json_data={
        "username":"admin",
        "password":"1234"
    }

#查找登录接口
    url="http://127.0.0.1:9099/login"
    response=requests.post(url=url,json=json_data).json()
    cur_msg=response.get('err','not fonud')

#断言
    self.assertEqual(cur_msg,'success')
#登录方法

class TestRegister(unittest.TestCase):
    def test_register(self):
        print("注册登录")
    def test_right(self):
        print('成功哦')


class TestSuit(unittest.TestSuite):
    pass





#主方法
if __name__=='__mian__':
    unittest.main()